home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12340 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: loki.tor.hookup.net!news
  2. From: Rajendra_Singh@msn.com (Rajendra Singh)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Is This Bad Coding Practice?
  5. Date: Sat, 30 Mar 1996 20:21:25 GMT
  6. Organization: HookUp Communication Corporation, Oakville, Ontario, CANADA
  7. Message-ID: <4jjqf1$6c1@loki.tor.hookup.net>
  8. References: <4jgnt2$9d1@loki.tor.hookup.net> <828135115snz@genesis.demon.co.uk>
  9. NNTP-Posting-Host: u36u400.tor.hookup.net
  10. NNTP-Posting-User: u36u400
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
  14.  
  15. >No, as soon as func1 returns test doesn't exist any more so you cannot
  16. >safely access it (doing so results in undefined behaviour). Don't
  17. >do it, even if it seems to work on your system - it will bite you, sooner
  18. >rather than later if you're lucky.
  19.  
  20. I was working with a company and one of the senior programmers had
  21. this piece of code in production.  When I questioned him about it, he
  22. says that it will always work.  I had my doubts, that's why I was
  23. curious as to whether or not it would always work.
  24.  
  25. By the way, the forementioned piece of code worked on AIX, SCO, HPUX,
  26. and OS/2.
  27. ---
  28. Rajendra Singh, B. Sc. (Rajendra_Singh@msn.com)
  29. "What is understood need not be discussed." - Loren Adams
  30.  
  31.